package com.example.everying.service.user;/*
 * 项目名称: everything
 * 文件名: UserService
 * 作者: 张泽阳
 * 日期: 2025/5/14
 * 描述:
 */

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.everying.model.dto.admin.AdminLoginDto;
import com.example.everying.model.dto.user.*;
import com.example.everying.model.entity.user.UserEntity;
import com.example.everying.model.vo.user.UserInfoVo;
import com.example.everying.utils.Result;
import jakarta.validation.constraints.NotNull;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

public interface UserService extends IService<UserEntity> {

    UserEntity getUserByOpenId(String openId);
    int insertUser(UserEntity user);
    UserInfoVo getUserById(String id);

    UserInfoVo userEdit(UserEditDto userEditDto);

    Boolean deleteUser(DeleteUserDto ids);

    Boolean uploadLocation(UploadLocationDto uploadLocation);
    void updateUserBalanceByOpenId(UserEntity user);

    Result<?> updateInformation(UpdateInformationDto updateInformation);

    Result<?> list (UserPageDto userPageDto);

    Result<?> login(AdminLoginDto adminLoginDto);

    Result<?> addUser(UserEntity user);

    List<UserEntity> getUserByPhone(String phone);
    public Result<?> selectPageWithBalance(Page<UserInfoVo> pageParam, UserPageDto userPageDto);

    List<UserEntity> getUserByIds(Set<String> ids);

    // 校验密码
    boolean verifyPassword(String userId, String password);
    // 设置密码
    boolean passwordUpdate(PasswordUpdateDto updateDto);

    void noticeUnreadCountPlus();

    // 获取用户名称
    String getUserNickname(String userId);

    // 获取用户头像
    String getUserAvatar(String userId);

    Integer getSignCount(LocalDateTime startTime, LocalDateTime endTime);

    /**
     * 获取指定日期的新增用户
     * @param date
     * @return
     */
    List<String> getNewUserByDate(LocalDate date);

    // 实名认证
    Result<?> auth(AuthDto authDto);

    boolean verifyIdentity(@NotNull(message = "真实姓名不能为空") String realName, String idCard,String id);

    boolean checkUserBalance(String userId, BigDecimal amount, Integer points);

    Result<?> bindWx (BindWxDto bindWxDto);

    boolean closePopup(String id);

    void saveTokenHash(UserInfoVo userInfoVo, String token);

    Long getRegisterCount(String phone);


    //实名认证
//    boolean verifyIdentity(@NotNull(message = "真实姓名不能为空") String realName, @NotNull(message = "身份证号") String idCard);

    //List<UserEntity> getUserByAdmin(String isAdministrator);

/*    UserEntity getUserByOpenId(String openId);

    int insertUser(UserEntity user);

    List<UserEntity> selectUserList (UserEntity user);

    UserEntity getUserById(String id);

    int updateUser(UserEntity user);

    int deleteUserById(String id);

    int deleteUserByIds(List<String> ids);*/


    //void updateUserBalanceByOpenId();
}
